package org.rocky.consumer.controller;

import org.rocky.consumer.service.MyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Rocky
 */
@Controller
public class MyController {
    private MyService myService;

    @Autowired
    public MyController(MyService myService){
       this.myService = myService;
    }

    @RequestMapping("/do")
    @ResponseBody
    public String myMethod(){
        String a = myService.doSomeThing();
        return a;
    }
}
